//
//  AppConfig.swift
//  Runner
//
//  Created by skj on 2021/5/21.
//

import UIKit

@objcMembers class AppConfig: NSObject {
    static let shared = AppConfig()
    private override init() {
        super.init()
    }
    var rootNav:BaseNavViewController? {
        guard let window = UIApplication.shared.delegate?.window  else {
            return nil
        }
        return window?.rootViewController as! BaseNavViewController
    }
    var currentVC : UIViewController? {
        let topVC = self.rootNav?.viewControllers.first
        if topVC == nil,let win = UIApplication.shared.delegate?.window {
            return win?.rootViewController
        }
        return topVC
    }

}
